//
//  BookView.m
//  softphone
//
//  Created by ffcs on 13-7-2.
//  Copyright (c) 2013年 ffcs. All rights reserved.
//

#import "BookView.h"

@implementation BookView
@synthesize imageView;
@synthesize flagImageView;

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code

        CGFloat width = frame.size.width;
        CGFloat height = frame.size.height; 
        
        CGFloat imageH = 105;
        CGFloat flagImageH = 30;
        CGRect imageFrame = CGRectMake(0, height-imageH, width, imageH);
        CGRect flagImageFrame = CGRectMake(width - flagImageH, 0, flagImageH, flagImageH);
        
        imageView = [[UIImageView alloc]initWithFrame:imageFrame];
        [self addSubview:imageView];
        
        flagImageView = [[UIImageView alloc]initWithFrame:flagImageFrame];
        [self addSubview:flagImageView];
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
